
import {defineStore} from "pinia"
import {ref} from "vue";

export const useGrantsStore = defineStore("grants",()=>{
// 定义一个变量：是否处理过权限相关的逻辑（动态菜单和动态的路由配置）
    const isDoGrants = ref(false);

    function isDoGrantsed(){
        isDoGrants.value = true;
    }

    return {
        isDoGrants,isDoGrantsed
    }

})

export const useUserStore = defineStore("user",()=>{
   
    const isLogin = ref(sessionStorage.getItem("checkedKeys") || false);

    function doLogin(){
        isLogin.value = true;
    }

    return {
        isLogin,doLogin
    }

})